using UnityEngine;
using System.Collections;
public delegate void RegistFunction(object pSender);
public class Facade {

	// Use this for initialization

	EventDispathcer  m_pEventDispathcer = new EventDispathcer();
	
	static Facade _instance;
	static public Facade Instance
    {
		get
		{
			if (_instance == null)
				_instance = new Facade();
			return _instance;
		}
	}

	public void RegistEvent(uint EventID,RegistFunction pFunction)
	{	
		m_pEventDispathcer.RegistEvent(EventID,pFunction);
	}
	public void UnRegistEvent(uint EventID,RegistFunction pFunction)
	{
		m_pEventDispathcer.UnRegistEvent(EventID,pFunction);
	}
	public void SendEvent(uint EventID,object pSender)
	{
		m_pEventDispathcer.HandleEvent(EventID,pSender);
	}
}
